import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: () => import('@/views/home/home.vue')
    },
    {
      path: '/about',
      name: 'about',
      component: () => import('../views/AboutView.vue')
    },
    {
      path: '/articleDetails',
      name: 'articleDetails',
      component: () => import('../views/ArticleDetails.vue')
    },
    // {
    //   path: '/article/:id',
    //   name: 'article',
    //   component: ArticleView,
    //   props: true // 将路由参数作为 props 传递给组件
    // },
    // {
    //   path: '/category/:category',
    //   name: 'category',
    //   component: CategoryView,
    //   props: true // 将路由参数作为 props 传递给组件
    // }
  ]
})

export default router
